package com.zmc.admin.infrastructure.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zmc.admin.infrastructure.entity.SysMenuEntity;
import com.zmc.admin.infrastructure.entity.SysUserEntity;
import com.zmc.admin.infrastructure.bean.query.SysMenuQuery;
import com.zmc.admin.infrastructure.bean.vo.menu.TreeSelect;
import com.zmc.common.utils.PageUtils;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 菜单权限表
 *
 * @author zmc
 * @email 
 * @date 2024-10-09 17:27:49
 */
public interface SysMenuService extends IService<SysMenuEntity> {

    PageUtils queryPage(Map<String, Object> params);

    Set<String> selectMenuPermsByUserId(Long userId);

    List<SysMenuEntity> selectMenuTreeByUserId(Long userId);

    List<SysMenuEntity> selectMenuList(SysMenuQuery query, SysUserEntity user);

    List<TreeSelect> buildMenuTreeSelect(List<SysMenuEntity> menus);

    boolean checkMenuNameUnique(SysMenuEntity menu);


    boolean hasChildByMenuId(Long menuId);


    boolean checkMenuExistRole(Long menuId);

    List<Long> selectMenuListByRoleId(Long roleId);

    Set<String> getMenuPermission(SysUserEntity user);
}

